using ASP;
using HoWave.Common;
using System;
using System.Web;
using System.Web.Profile;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
public class AdminIndexMaster : MasterPage
{
	protected ContentPlaceHolder CPHead;
	protected HtmlHead Head1;
	protected ContentPlaceHolder ContentPlaceHolder1;
	protected HtmlForm form1;
	protected DefaultProfile Profile
	{
		get
		{
			return (DefaultProfile)this.Context.Profile;
		}
	}
	protected global_asax ApplicationInstance
	{
		get
		{
			return (global_asax)this.Context.ApplicationInstance;
		}
	}
	protected string positionname
	{
		get;
		set;
	}
	protected void Page_Load(object sender, EventArgs e)
	{
		string text = base.Request["MenuName"].IsNull(new object[0]).Trim();
		string text2 = base.Request["FileName"].IsNull(new object[0]).Trim();
		if (text2 == "")
		{
			text2 = this.Page.Title;
		}
		if (text != "")
		{
			this.positionname += string.Format("&nbsp;>>&nbsp;{0}", text);
		}
		if (text2 != "")
		{
			this.positionname += string.Format("&nbsp;>>&nbsp;{0}", text2);
		}
		Random random = new Random();
		int num = random.Next(99);
		bool flag = num < 20;
		bool flag2;
		if (flag)
		{
			flag2 = Certify.CheckIdentifyRegCode();
			HttpContext.Current.Cache.Insert("isright", flag2, null, DateTime.Now.AddHours(2.0), TimeSpan.Zero);
		}
		else
		{
			if (HttpContext.Current.Cache["isright"] == null)
			{
				flag2 = Certify.CheckIdentifyRegCode();
				HttpContext.Current.Cache.Insert("isright", flag2, null, DateTime.Now.AddHours(2.0), TimeSpan.Zero);
			}
			else
			{
				flag2 = (HttpContext.Current.Cache["isright"].ToString() == "True");
			}
		}
		if (StaticFun.IsNeedCheckIdentifyRegCode && !flag2)
		{
			string text3 = "<SCRIPT type=text/javascript>" + Environment.NewLine;
			text3 = text3 + "var d = new Date()" + Environment.NewLine;
			text3 = text3 + "var vYear = d.getYear()" + Environment.NewLine;
			text3 = text3 + "document.write(\"Powered by <a href='http://www.vgoshop.com' target=_blank style='color:#0000ff;font-weight: bold;'>广州市恒浪网络科技有限公司</a> 版权所有\u3000版本号：VgoMall2013SP1_<a href='http://www.vgoshop.com/Service/ShowArticle.asp?ArticleID=23' target='_blank' title='查看什么是体验版'>体验版</a>_Build0802 <BR>Copyright©&nbsp;2006-\"+vYear+\" GuangZhou Howave Co.,Ltd. All Rights Reserved\")</SCRIPT>" + Environment.NewLine;
			Label label = new Label();
			label.Text = text3;
			this.ContentPlaceHolder1.Controls.Add(label);
		}
	}
}
